package com.huilian.iotbox.data.vo;

import com.huilian.iotbox.data.dto.QueryParam;
import lombok.Data;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

@Data
public class MemberStoreBalanceVo extends QueryParam implements Serializable {
    private static final long serialVersionUID = -7770086201944311803L;
    private Long id;
    /**
     * 用户会员id
     */
    private Long memberId;
    /**
     * userId
     */
    private Integer userId;
    /**
     * 店铺id
     */
    private Integer merchantStoreId;
    /**
     * 用户第一次使用时注册的机器号
     */
    private String registerDeviceNo;
    /**
     * 人民币充值余额
     */
    private BigDecimal moneyRechargeBalance;
    /**
     * 人民币赠送余额
     */
    private BigDecimal moneyDonateBalance;
    /**
     * 充值余额
     */
    private Integer rechargeBalance;
    /**
     * 赠送余额
     */
    private Integer donateBalance;
    /**
     * 彩票余额
     */
    private Integer lottery;
    /**
     * 累计支付
     */
    private BigDecimal totalPay;
    /**
     * 最近一次支付
     */
    private Date latelyPay;
    /**
     * 消费等级：1：白银  2：黄金  3：钻石
     */
    private Integer levelPay;

    /**
     * 状态 0:失效 ,1:正常
     */
    private Integer status;
    /**
     * 版本id
     */
    private Integer versionId;

    private Date createTime;

    private Date updateTime;

    /**
     * 门店名称
     */
    private String storeName;
    /**
     * 用户昵称
     */
    private String nickName;
    /**
     * 用户头像
     */
    private String headImgUrl;
    /**
     * 性别
     */
    private Integer sex;
    /**
     * 设备状态
     */
    private Integer deviceStatus;
    /**
     * 余币
     */
    private Integer surplusCoin;
    /**
     * 支付成功的金额
     */
    private BigDecimal successMoney;
    /**
     * 交易成功的总币
     */
    private Integer successCoin;
    /**
     * 是否调试模式，0为投币, 1为免费
     */
    private Integer model;

    private Integer storeStatus;

    private Integer currencyBalance;

    private String payCompanyCode;

    private BigDecimal totalAmount;

    private Integer consume;

    private String mobile;
    private String cardNo;
    /**
     * 别名
     */
    private Integer alias;
    private Boolean isExchange;

    /**
     * 会员游戏币总计数量
     */
    private Integer gameCoinTotal;
    /**
     * 普通币有效期记录
     */
    private TermOfValidityCoinVo commonTermOfValidityCoin;
    /**
     * 赠送币有效期记录
     */
    private TermOfValidityCoinVo donateTermOfValidityCoin;

    /**
     * 娃娃币
     */
    private Integer integral;
    /**
     * 套餐计量单位，如：局、次、分钟、圈
     */
    private String measuringUnit;

    /**
     * 维度
     */
    private BigDecimal latitude;
    /**
     * 经度
     */
    private BigDecimal longitude;
    private Integer distance;

    /**
     * 游戏币公用，null/0：不公用，1、公用
     */
    private Integer gameCurrencySharing;

    /**
     * 余下金额
     */
    private BigDecimal totalMoney;

    /**
     * 余下游戏币
     */
    private Integer totalCurrency;

    /**
     * 套票数（未过期未使用
     */
    private Integer ticketCount;

    private String openId;

    public void deductRechargeBalance(int amount) {
        rechargeBalance -= amount;
    }

    public void deductDonateBalance(int amount) {
        donateBalance -= amount;
    }


    /**
     * 人民币总余额
     */
    private BigDecimal totalMoneyBalance;
    /**
     * 游戏币总余额
     */
    private Integer totalCoinBalance;

    private List<TermOfValidityCoinVo> rechargeTermOfValidityCoinVos;
    private List<TermOfValidityCoinVo> donateTermOfValidityCoinVos;

    private String remarkName;

    private Long micId;
}
